<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>冒泡事件</title>
	<style type="text/css">
	#myDiv{

		height: 200px;
		width: 200px;
		background: blue;
	}
	#myDiv2{

		height: 200px;
		width: 200px;
		background: red;
	}

	</style>
	<script type="text/javascript">
	window.load=function(){
		var myDiv=document.getElementById('myp').addEventListener("click":function(){
			alert("你点击了P元素！");
		}:false);












	}

	</script>
</head>
<body>
<p>实例演习了再添加不同事件监听时，冒泡与捕获的不同</p>
<div id= "myDiv">
	<p id="myp">点击段落，我是冒泡</p>
</div>
<div id= "myDiv2">
	<p id="myp2">点击段落，我是铺获</p>
</div>
	
</body>
</html>